<admintpl file="header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li ><a href="{:U('Admin/Resources/index')}">全部</a></li>
        <li><a href="{:U('Admin/Resources/video_index')}">视频</a></li>
        <li class="active"><a href="{:U('Admin/Resources/outside_index')}">外链</a></li>
    </ul>

    <form class="well form-search" id="query_form" method="post" action="{:U('Admin/AdminUser/outside_index')}">
        
        姓名：<input type="text" name="Name" style="width: 120px;" value="{$formParam.Name}" placeholder="请输入关键字...">
        发布者：<input type="text" name="creatorName" style="width: 120px;" value="{$formParam.creatorName}" placeholder="请输入发布者姓名...">
        起始：<input type="text" name="startDate" style="width: 120px;" value="{$formParam.startDate}" placeholder="">
        结束：<input type="text" name="endDate" style="width: 120px;" value="{$formParam.endDate}" placeholder="">
        <input type="button" name="query_form_btn" id="queryBtn" data-action="{:U('Admin/Resources/outside_index')}"  class="btn btn-primary" value="查询"/>
        <a href='{:U("Admin/Resources/outsideAdd")}' class="btn btn-primary" >添加素材</a>
        <br/><br/>
        
    </form>
    <form class="js-ajax-form" action="" method="post">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>上传时间</th>
                <th>发布者</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <?php $tmp_key = 0;?>
            <foreach name="data" item="vo">
                <tr>
                    <td>{$key+1}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.create_time}</td>
                    <td>{$vo.creator_name}</td>
                    <td>
                         <a href='{:U("Admin/Resources/outsideAdd",array("resource_id"=>$vo["resource_id"]))}' >修改</a>
                        <a href='{:U("Admin/Resources/del",array("resource_id"=>$vo["resource_id"]))}' class="js-ajax-dialog-btn"
                           data-msg="确定要删除此业务管理员吗？">删除</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </form>
    <div class="pagination">{$page}</div>
</div>


<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
    $(document).ready(function () {
        $('input[name="query_form_btn"]').click(function () {
            $('#query_form').attr('action', $(this).attr('data-action'));
            $('#query_form').submit();
        });
    });
    
 function edit_role(admin_id){
	  layer.open({
  	    type: 2,
  	    //skin: 'layui-layer-lan',
  	    title: '修改管理员权限',
  	    fix: false,
  	    shadeClose: true,
  	    maxmin: true,
  	    area: ['1000px', '500px'],
  	    content: "<?php echo U('Admin/AdminUser/editRole')?>"+'&admin_id='+admin_id,
  	    end: function(){
  	    	location.reload();
  	    }
  	  });
 }
</script>
</body>
</html>

